perf: default stmt to func#827
Merged
Merged
Conversation
Signed-off-by: ldintr <levo.d@swirldslabs.com>
Signed-off-by: ldintr <levo.d@swirldslabs.com>
…unction Signed-off-by: ldintr <levo.d@swirldslabs.com>
Contributor
anthony-swirldslabs
left a comment
There was a problem hiding this comment.
The performance numbers look great.
The code looks good overall, too. I added a few comments, mostly of stylistic nature about both the generator and the generated code.
Also, it'd be useful to attach a copy of a generated codec for reviewers to examine the changes (you can attach it to a GitHub comment in this PR.) A good candidate would be the EverythingProtoCodec.java file as it would show almost everything there's in PBJ.
Signed-off-by: ldintr <levo.d@swirldslabs.com>
Contributor
Author
|
Fixed. Here's the before and after of EverythingProtoCodec.java |
anthony-swirldslabs
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Moves default case into its own function so optimizer can choose what to inline
Prev bench numbers
Benchmark (type) Mode Cnt Score Error Units
GenericParserQuickBench.bench NotCacheableAccountIDType thrpt 15 292.432 ± 14.627 ops/us
https://github.com/hashgraph/pbj/actions/runs/25826669514/job/75881464290
New
Default Case Commit
Benchmark (type) Mode Cnt Score Error Units
GenericParserQuickBench.bench NotCacheableAccountIDType thrpt 15 446.331 ± 7.801 ops/us
https://github.com/hashgraph/pbj/actions/runs/25863069512/job/75997769734
Some additional cases as func from generateFieldCaseStatementPacked
Benchmark (type) Mode Cnt Score Error Units
GenericParserQuickBench.bench NotCacheableAccountIDType thrpt 15 450.417 ± 2.910 ops/us
https://github.com/hashgraph/pbj/actions/runs/25867304244/job/76012761470
NOTE: Hash is different because I ran this before applying spotlight
Benchmark (type) Mode Cnt Score Error Units
GenericParserQuickBench.bench NotCacheableAccountIDType thrpt 15 451.509 ± 5.192 ops/us
https://github.com/hashgraph/pbj/actions/runs/25921616637/job/76191842411
Checklist